home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!txwang
- From: Wang TianXing <gztxwang@public1.guangzhou.gd.cn>
- Newsgroups: comp.lang.c++
- Subject: Re: Fastest Sorting Algorithm?
- Date: Thu, 04 Apr 1996 04:50:01 GMT
- Message-ID: <199604040451.MAA05683@public1.guangzhou.gd.cn>
- X-NNTP-Posting-Host: txwang
- X-Newsreader: Forte Free Agent 1.0.82
- X-Mail2News-Path: public1.guangzhou.gd.cn!txwang
-
- On Wed, 3 Apr 1996 19:51:18 GMT, sckettle@undergrad.math.uwaterloo.ca
- (Steve Kettle) wrote:
-
- | In article <Dou55w.7MB@novice.uwaterloo.ca>,
- | Gerald Wang <GTWANG@HELIX.Watstar.UWaterloo.CA> wrote:
- | >A classmate was recently asked during a job interview what is the fastest
- | >method to sort an array of numbers. He replied "Use a quicksort." They
- | >asked "And how would you make it faster still?" He couldn't come up with
- | >much...end of interview.
- | >
- | >I know it's a vague question... Any ideas on what they were asking? Or
- | >what the right answer is?
- | >
- | >Gerald
- | >
- | >-------------------------------------------------------------------------
- | >Gerald Wang
- | >http://www.csclub.uwaterloo.ca/~gtwang
- | >
- | >
-
- | Well you could use a type of bucket sorting algorithm which is faster than
- | quicksort when sorting integers. How to make it faster I don't know - you
- | don't really make algortithms faster you make code implementations of
- | algorithms faster. Mybe they meant tweaking stratigies for quicksort like how
- | to choose a pivot element. Who knows.
-
- | --
-
- The right "answer" is to ask them what they are going to sort.
-
- When you were confronted with such kind of "the best", "the fastest",
- "the whatever'est" questions, always ask the questioner what s/he
- really wants to do.
-
- ---
- Wang TianXing
-
-
-